const {ccclass, property} = cc._decorator;

@ccclass
export default class background extends cc.Component {
    // LIFE-CYCLE CALLBACKS:

    onLoad () {}

    start () {

    }

    update (dt) {
        for(let item of this.node.children) {
            // 如果要每秒多少像素就乘以dt
            item.y -= 50 * dt;
            if (item.y < -800) {
                item.y += 800 * 2;
            }
        }
    }
}
